package com.itheima.utils;

import com.itheima.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;

@Component
public class ProductUtils {
    @Autowired
    private ProductService productService;

    public String getProductTitle(int productId) {
        return productService.getProductTitle(productId);
    }

    public String getProductImage(int productId) {
        return productService.getProductImage(productId);
    }

    public BigDecimal getProductPrice(int productId) {
        return productService.getProductPrice(productId);
    }

    public String getDescription(int productId) {
        return productService.getProductDescription(productId);
    }

    public String getProductSellerPhone(int productId) {
        return productService.getProductSellerPhone(productId);
    }

    public String getProductConditionLevel(int productId) {
        return productService.getProductConditionLevel(productId);
    }
}
